package com.sky.controller.admin;

import com.sky.result.PageResult;
import com.sky.result.Result;
import com.sky.service.admin.AdminSetmeaIService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

@RestController("adminSetmealController")
@RequestMapping("/admin/setmeal")
@Slf4j
@Api(tags = "套餐管理")
public class SetmealController {
    @Resource
    AdminSetmeaIService adminSetmeaIService;
    @GetMapping("/page")
    @ApiOperation("套餐分页")
    public Result<PageResult> pageSetmeal( Integer categoryId,
                                           String name,
                                          @RequestParam() int page,
                                          @RequestParam int pageSize,
                                           Integer status){
        Result<PageResult> pageSetmeal = adminSetmeaIService.getPageSetmeal(categoryId,name,page,pageSize,status);
        return pageSetmeal;
    }
}
